package com.sinodata.bsm.common.vo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * EventPropHis entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "EVENT_PROP_HIS")
public class EventPropHis implements java.io.Serializable {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 993134862561288143L;

    // Fields  
    private Long id;
    private Long eventId;
    private Long resId;
    private Long propId;
    private String propValue;
    private Date propCollectTime;
    private Date eventOccurTime;

    // Constructors

    /** default constructor */
    public EventPropHis() {
    }

    /** minimal constructor */
    public EventPropHis(Long id) {
        this.id = id;
    }

    /** full constructor */
    public EventPropHis(Long id, Long eventId, Long resId, Long propId, String propValue, Date propCollectTime, Date eventOccurTime) {
        this.id = id;
        this.eventId = eventId;
        this.resId = resId;
        this.propId = propId;
        this.propValue = propValue;
        this.propCollectTime = propCollectTime;
        this.eventOccurTime = eventOccurTime;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "EVENT_PROP_HIS_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "EVENT_ID", precision = 18, scale = 0)
    public Long getEventId() {
        return this.eventId;
    }

    public void setEventId(Long eventId) {
        this.eventId = eventId;
    }

    @Column(name = "RES_ID", precision = 18, scale = 0)
    public Long getResId() {
        return resId;
    }

    public void setResId(Long resId) {
        this.resId = resId;
    }

    @Column(name = "PROP_ID", precision = 18, scale = 0)
    public Long getPropId() {
        return this.propId;
    }

    public void setPropId(Long propId) {
        this.propId = propId;
    }

    @Column(name = "PROP_VALUE", length = 1024)
    public String getPropValue() {
        return this.propValue;
    }

    public void setPropValue(String propValue) {
        this.propValue = propValue;
    }

    @Column(name = "PROP_COLLECT_TIME", length = 7)
    public Date getPropCollectTime() {
        return this.propCollectTime;
    }

    public void setPropCollectTime(Date propCollectTime) {
        this.propCollectTime = propCollectTime;
    }

    @Column(name = "EVENT_OCCUR_TIME", length = 7)
    public Date getEventOccurTime() {
        return this.eventOccurTime;
    }

    public void setEventOccurTime(Date eventOccurTime) {
        this.eventOccurTime = eventOccurTime;
    }

    @Override
    public String toString() {
        return "EventPropHis [id=" + id + ", eventId=" + eventId + ", resId=" + resId + ", propId=" + propId + ", propValue=" + propValue + ", propCollectTime=" + propCollectTime + ", eventOccurTime=" + eventOccurTime + "]";
    }

}